#ifndef __REF_H__
#define __REF_H__


#include "container_common.h"

struct Sequence {
	vector<char> base;
	
	Sequence() {
	}

	~Sequence() {
		clear();
	}

	char* getBase() {
		return &(base.front());
	}

	unsigned int getNumBase() const {
		return base.size();
	}

	void read(const char* fileName) {
		ifstream ifs(fileName);
		string str;	
		int numLine = 0;
		int numBase = 0;
		getline(ifs, str);		

		while(getline(ifs, str)) {
			++numLine;
			numBase += str.size();
			for(int i = 0; i < str.size(); i++) {
				base.push_back(str[i]);
			}
		}
		assert(numBase == base.size());

		ifs.close();

		cout << "Ref::read done. There are " << numBase << " bases" << endl;
	}

	void clear() {
		base.clear();
	}
};

#endif /*__REF_H__*/
